package com.czmh.etc.onlinepubsys.services.mingchuang.impl;

import com.czmh.etc.onlinepubsys.entity.mingchuang.CarInfo;
import com.czmh.etc.onlinepubsys.maper.mingchuang.CarInfoMapper;
import com.czmh.etc.onlinepubsys.services.mingchuang.ICarInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = Exception.class)
public class CarInfoServiceImpl implements ICarInfoService {
    @Autowired
    private CarInfoMapper carInfoMapper;

    public void save(CarInfo entity) {
        carInfoMapper.insert(entity);
    }

    public CarInfo get(String id) {
        return carInfoMapper.selectById(id);
    }

    public void update(CarInfo carInfo) {
        carInfoMapper.updateById(carInfo);
    }
}
